package ink.onei.mydemo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ink.onei.mydemo.mapper.BoboMapper;
import ink.onei.mydemo.domain.Bobo;
import ink.onei.mydemo.service.IBoboService;

/**
 * 笔记Service业务层处理
 * 
 * @author nekotako
 * @date 2024-02-02
 */
@Service
public class BoboServiceImpl implements IBoboService 
{
    @Autowired
    private BoboMapper boboMapper;

    /**
     * 查询笔记
     * 
     * @param id 笔记主键
     * @return 笔记
     */
    @Override
    public Bobo selectBoboById(Integer id)
    {
        return boboMapper.selectBoboById(id);
    }

    /**
     * 查询笔记列表
     * 
     * @param bobo 笔记
     * @return 笔记
     */
    @Override
    public List<Bobo> selectBoboList(Bobo bobo)
    {
        return boboMapper.selectBoboList(bobo);
    }

    /**
     * 新增笔记
     * 
     * @param bobo 笔记
     * @return 结果
     */
    @Override
    public int insertBobo(Bobo bobo)
    {
        return boboMapper.insertBobo(bobo);
    }

    /**
     * 修改笔记
     * 
     * @param bobo 笔记
     * @return 结果
     */
    @Override
    public int updateBobo(Bobo bobo)
    {
        return boboMapper.updateBobo(bobo);
    }

    /**
     * 批量删除笔记
     * 
     * @param ids 需要删除的笔记主键
     * @return 结果
     */
    @Override
    public int deleteBoboByIds(Integer[] ids)
    {
        return boboMapper.deleteBoboByIds(ids);
    }

    /**
     * 删除笔记信息
     * 
     * @param id 笔记主键
     * @return 结果
     */
    @Override
    public int deleteBoboById(Integer id)
    {
        return boboMapper.deleteBoboById(id);
    }
}
